/* =========================================================================

DESCRIPTION
   cae_app

Copyright (c) 2015 by  USTC iFLYTEK, Co,LTD.  All Rights Reserved.
============================================================================ */

/* =========================================================================

                             REVISION

when            who              why
--------        ---------        -------------------------------------------
2016/01/27      mfshi               Created.
============================================================================ */
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <alsa/asoundlib.h>
#include <pthread.h>

typedef int HANDLE;
//#define IIC_TEST 0

bool read_angle(int fd,int *);

bool query_version( int fd);

bool enter_reset( int fd);

bool set_beam0(int fd);

bool set_beam1(int fd);

bool set_beam2( int fd);

bool set_beam3( int fd);

bool set_beam(int fd);

bool test_iic(int fd);

bool result_i2c_test(void);

int open_i2c_device(const char *);

void close_i2c_device(int);

bool  write_i2c_device(int, int, const unsigned char *);

bool  read_i2c_device(int, int, unsigned char *);

void file_write(int, int, int, int, char *);

bool chos_cmd(char *, int, int,int *);

void fault_record();
